CREATE TABLE [dbo].[TDTRAB_PROC]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_TRAB] [dbo].[TD_VC_020] NOT NULL,
[CO_PLAN] [dbo].[TD_VC_003] NOT NULL,
[NU_ANNO] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDTRAB_PR__NU_AN__0C91969C] DEFAULT ((0)),
[NU_PERI] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDTRAB_PR__NU_PE__0D85BAD5] DEFAULT ((0)),
[CO_CPTO_FORM] [dbo].[TD_VC_006] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDTRAB_PR__NU_SE__0E79DF0E] DEFAULT ((0)),
[CO_MONE] [dbo].[TD_VC_003] NULL,
[CO_UNID_CNTB] [dbo].[TD_VC_003] NULL,
[IM_TRAB_CALC] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDTRAB_PR__IM_TR__0F6E0347] DEFAULT ((0)),
[CO_BANC] [dbo].[TD_VC_003] NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NULL,
[CO_CAJA] [dbo].[TD_VC_008] NULL,
[NU_COMP_BACA] [dbo].[TD_VC_008] NOT NULL,
[FE_OPER] [dbo].[TD_DT_001] NULL,
[FA_TIPO_CAMB] [dbo].[TD_NU_015_006] NULL,
[CO_TIPO_OPER] [dbo].[TD_VC_003] NULL,
[CO_SUBR] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDTRAB_PR__CO_US__10622780] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDTRAB_PR__FE_US__11564BB9] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDTRAB_PR__CO_US__124A6FF2] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDTRAB_PR__FE_US__133E942B] DEFAULT (getdate()),
[ST_OPCI_TRAB] [dbo].[TD_VC_003] NULL,
[ST_OPCI_PLAN] [dbo].[TD_VC_003] NULL,
[NO_BENE] [dbo].[TD_VC_100] NULL,
[FE_AMPL] [dbo].[TD_DT_001] NULL,
[FE_LIQU] [dbo].[TD_DT_001] NULL,
[ST_GENE_COMP] [dbo].[TD_VC_001] NULL,
[IM_TRAB_CONV] [dbo].[TD_NU_016_004] NULL,
[NU_CHEQ_USAD] [dbo].[TD_IN_001] NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NULL,
[NU_DOCU_BANC] [dbo].[TD_VC_020] NULL,
[FE_CHEQ] [dbo].[TD_DT_001] NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[TDTRAB_PROC] ADD 
CONSTRAINT [PK__TDTRAB_P__8EC13E7309B529F1] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_TRAB], [CO_PLAN], [NU_ANNO], [NU_PERI], [CO_CPTO_FORM], [NU_SECU]) ON [PRIMARY]
ALTER TABLE [dbo].[TDTRAB_PROC] ADD
CONSTRAINT [FK__TDTRAB_PR__CO_EM__0B9D7263] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
